<?php
$config = [
    'components' => [
        'request' => [
            // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
            'cookieValidationKey' => 'qRWhnSCiAwXUoDix1so-QWSB17i-f1KW'
        ],
        'urlManager' => [
            // here is your normal backend url manager config
            'enablePrettyUrl' => true, // 路由的路径化，通過.htaccess配置了
            'showScriptName' => false, // 这一步是将代码里链接的index.php隐藏掉。
            'rules'=>array(
                'xinwen' => 'article/news-list',
                'huodong'=>'article/activity-list',
                'fenlei'=>'game/index',
                '/<type_alias>'=>'game/list',
                //'article/<id:\d+>'=>'article/detail',
            ),
        ],
        'request'=>[
            'enableCsrfValidation' => true,
        ],
    ]
];

if (! YII_ENV_TEST) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = 'yii\debug\Module';

    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = 'yii\gii\Module';
}

return $config;
